<!--
  To change this license header, choose License Headers in Project Properties.
  To change this template file, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
    <head>
        <meta name="layout" content="frontend">
        <META HTTP-EQUIV="Refresh" CONTENT="5;URL=${createLink(action: 'ping')}">
    </head>
    <body>
        <g:form action="ping">
            <div class="fieldcontain">
                <label>位址一</label>
                <input name="ip" value="192.168.210.238" size="40" />
            </div>
            <div class="fieldcontain">
                <label>位址二</label>
                <input name="ip" value="192.168.210.239" size="40" />
            </div>
            <div class="fieldcontain">
                <label>位址三</label>
                <input name="ip" value="192.168.210.240" size="40" />
            </div>
            <div class="fieldcontain">
                <label>位址四</label>
                <input name="ip" value="192.168.210.241" size="40" />
            </div>
            <div class="fieldcontain">
                <label>位址五</label>
                <input name="ip" value="" size="40" />
            </div>
            <div class="fieldcontain">
                <label></label><g:submitButton name="regEvents" value="查詢" class="btn btn-primary btn-sm" />
                <span id="error" style="color:red;display:none">　最少需選一場次！</span>
            </div>
        </g:form>
        <g:if test="${flash.message}">
            <div class="message" role="status">${flash.message}</div>
        </g:if>
            <table>
                <thead>
                    <tr>
                        <!-- <th>多活動報名</th> -->
                        <th>位址</th>
                        <th>結果</th>
                        <th>時間</th>
                    </tr>
                </thead>
                <tbody>
                <g:each in="${resultList}" status="i" var="result">
                        <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
                            <td>${result.ip}</td>
                            <td>${result.status}</td>
                            <td>${result.time}</td>
                         </tr>
                    </g:each>
                </tbody>
            </table>
    </body>
</html>